<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .wrap{
            width: 300px;
            height: 300px;
            background: pink;

            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            top: 0;
            margin: auto;
        }

        .inner{
            display: inline-block;
            background: gray;

            /*left 和 top的百分比参照于其包含块的width*/
            /*transform 中translate的百分比 参照于自身的*/
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
        }
    </style>
</head>
<body>
    <div id="app">
       <div class="wrap" @click="wrapFn">
           <div class="inner" @click="innerFn">
                123 <br>
                123 <br>
                123 <br>
                123 <br>
           </div>
       </div>
    </div>
</body>
</html>